/*    */ package com.zimbra.cs.mime;
/*    */ 
/*    */ import com.zimbra.cs.store.MailboxBlob;
/*    */ import com.zimbra.cs.store.StoreManager;
/*    */ import java.io.IOException;
/*    */ import java.io.InputStream;
/*    */ import java.io.OutputStream;
/*    */ import javax.activation.DataSource;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class MailboxBlobDataSource
/*    */   implements DataSource
/*    */ {
/*    */   private MailboxBlob mBlob;
/*    */   private String mContentType;
/*    */   
/*    */   public MailboxBlobDataSource(MailboxBlob blob)
/*    */   {
/* 43 */     this.mBlob = blob;
/*    */   }
/*    */   
/*    */   public MailboxBlobDataSource(MailboxBlob blob, String ct) {
/* 47 */     this(blob);
/* 48 */     this.mContentType = ct;
/*    */   }
/*    */   
/*    */   public String getContentType() {
/* 52 */     if (this.mContentType != null)
/* 53 */       return this.mContentType;
/* 54 */     return "message/rfc822";
/*    */   }
/*    */   
/*    */   public InputStream getInputStream() throws IOException {
/* 58 */     return StoreManager.getInstance().getContent(this.mBlob);
/*    */   }
/*    */   
/*    */   public String getName()
/*    */   {
/* 63 */     return this.mBlob.toString();
/*    */   }
/*    */   
/*    */   public OutputStream getOutputStream() {
/* 67 */     throw new UnsupportedOperationException();
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/mime/MailboxBlobDataSource.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */